import Image, { ImageLoader, ImageProps } from 'next/image'

const imgLoader: ImageLoader = ({ src, width, quality }) => {
  return `/${src}`
}

const Img = (props: ImageProps) => {
  return (
    <div className={props.className} style={props.style}>
      <Image
        loader={imgLoader}
        src={props.src}
        width={'100%'}
        height={'100%'}
        className='img'
        alt={props.alt}
      />
    </div>
    
  )
}

export default Img